﻿using Autofac.Extensions.DependencyInjection;
using NLog.Extensions.Logging;
namespace Ceri.Platform.EAM_NEW.API
{
    public class Program
    {
        public static void Main(string[] args)
        {
            Host.CreateDefaultBuilder(args)
             .UseServiceProviderFactory(new AutofacServiceProviderFactory())
             .ConfigureWebHostDefaults(webBuilder =>
             {
                 webBuilder
                 .UseStartup<Startup>()
                 .UseUrls("http://*:5102")
                 .ConfigureLogging((hostingContext, builder) =>
                 {
                     builder.AddFilter("System", LogLevel.Error);
                     builder.AddFilter("Microsoft", LogLevel.Error);
                     builder.SetMinimumLevel(LogLevel.Error);
                     builder.AddNLog(Path.Combine(Directory.GetCurrentDirectory(), "Nlog.config"));
                 });
             })
             .Build()
             .Run();
        }
    }
}